//---------------------------------------------------------------------------

#ifndef DPCnsFluCxH
#define DPCnsFluCxH
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include "DialPad.h"
#include "PHDS.h"
#include <ExtCtrls.hpp>
#include "PHEdit.h"
#include "PHGridEd.h"
#include "PHLabel.h"
#include <Buttons.hpp>
#include <Grids.hpp>
#include "PHCombo.h"
#include "PHCheck.h"
#include <Graphics.hpp>
#include "DIALPAD.h"
#include "Geracao.h"
#include <Mask.hpp>
//---------------------------------------------------------------------------
class TDPCnsFluCx1 : public TDiPad
{
__published:	// IDE-managed Components
 PHGridEdit *PHGridEdit1;
 PHDataSource *DSFluCx;
 PHEdit *PHEdit1;
 PHLabel *PHLabel1;
 PHLabel *PHLabel2;
 PHEdit *PHEdit2;
 PHLabel *PHLabel3;
 PHEdit *PHEdit3;
 PHLabel *PHLabel4;
 PHEdit *PHEdit4;
 TImage *ImageMais;
 TImage *ImageMenos;
 TImage *ImageMaissel;
 TImage *ImageMenossel;
 TPanel *Panel2;
 PHLabel *PHLabel5;
 PHLabel *PHLabel6;
 TStaticText *StaticText1;
 TStaticText *StaticText2;
 PHCheckBox *PHCheckBox1;
 TSpeedButton *SpeedButton1;
 TSpeedButton *SpeedButton2;
 TSpeedButton *SpeedButton3;
 void __fastcall DSFluCxAfterOpen(TObject *Sender);
 void __fastcall PHGridEdit1DrawGridCell(int Row, int Col,
          TColor &CorTexto, TColor &CorFundo, bool &AplicarCoresSelecao,
          PHDataSource *PHDS, AnsiString &Conteudo);
 void __fastcall PHEdit1Change(TObject *Sender);
 void __fastcall PHEdit2Change(TObject *Sender);
 void __fastcall FormClose(TObject *Sender, TCloseAction &Action);
 void __fastcall FormShow(TObject *Sender);
 void __fastcall DSFluCxBeforePost(TObject *Sender);
 void __fastcall PHGridEdit1Click(TObject *Sender);
 void __fastcall PHGridEdit1KeyDown(TObject *Sender, WORD &Key,
          TShiftState Shift);
 void __fastcall FormDestroy(TObject *Sender);
 void __fastcall PHCheckBox1Click(TObject *Sender);
 void __fastcall SpeedButton1Click(TObject *Sender);
 void __fastcall SpeedButton3Click(TObject *Sender);
 void __fastcall SpeedButton2Click(TObject *Sender);

private:	// User declarations
 void __fastcall LimpaGrid(void);
 void __fastcall Processamento(TObject* Sender);
 void __fastcall ProcessaSaldos(TObject *Sender);
 void __fastcall ProcessaCaixa(void);
 void __fastcall ProcessaPagar(void);
 void __fastcall ProcessaReceber(void);
 void __fastcall ProcessaCheques(void);
 void __fastcall TrabalhaDados(TObject *Sender);
 void __fastcall Totalizar(void);
 void __fastcall TotalizarAtrasadas(void);
 void __fastcall AjustaGrid(bool Filtrar);
 void __fastcall CalculaPrevisaoCaixa(void);
 void __fastcall ProcessaReceber_2(TObject *Sender);
 void __fastcall OrdenaRegistros(TObject *Sender);

 struct MVFLCX* Fluxo;
 AnsiString GE;
 double SaldoAnterior;
 UINT DataSaldoAnterior;
 UINT Data;
 double CaixaEntrada;
 double Receber;
 double ReceberAtraso;
 double CaixaSaida;
 double Pagar;
 double PagarAtraso;
 double Entradas;
 double Saidas;
 double Saldo;
 double ChequeEntrada;
 double ChequeSaida;
 AnsiString Historico;
 TGeracao* Ger;
 bool Ajustando;
 AnsiString Sinal;
public:		// User declarations
 __fastcall TDPCnsFluCx1(TComponent* Owner);
 
};
//---------------------------------------------------------------------------
extern PACKAGE TDPCnsFluCx1 *DPCnsFluCx1;
//---------------------------------------------------------------------------
#endif
